package com.party.business.service.impl;

import com.party.business.service.*;
import com.party.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: zhaoyongke
 * @create: 2024-10-23 09:29
 * @description: 实现
 */
@Service
public class TwebApiServiceImpl implements TWebApiService {
;


    @Autowired
    private ITFjFileService tFjFileService;





    @Autowired
    private ISysDeptService deptService;



    public static List<String> splitStringByLength(String input) {

        int length = 20;
        int lengthls = 22;
        // 按照长度分割字符串，忽略标点符号
        List<String> result = new ArrayList<String>();
        int start = 0;
        int y = 0;
        while (start < input.length()) {
            if (y == 0) {
                if (start + length <= input.length()) {
                    // 添加从start开始，长度为length的子串
                    result.add(input.substring(start, start + length));
                } else {
                    // 如果剩余部分不足length，则添加剩余部分
                    result.add(input.substring(start));
                }
                start += length;
            } else {

                if (start + lengthls <= input.length()) {
                    // 添加从start开始，长度为length的子串
                    result.add(input.substring(start, start + lengthls));
                } else {
                    // 如果剩余部分不足length，则添加剩余部分
                    result.add(input.substring(start));
                }
                start += lengthls;
            }

            y++;
        }
        return result;

    }
}
